package factory.abstractfactory;

/**
 * @ClassName SharpFactory
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/15 10:45
 * @Version 1.0
 */
public class SharpFactory extends AbstractFactory {
	@Override
	Sharp getSharp(String sharp) {
		if ("circle".equalsIgnoreCase(sharp)) {
			return new Circle();
		} else if ("square".equalsIgnoreCase(sharp)) {
			return new Square();
		} else if ("rectangle".equalsIgnoreCase(sharp)) {
			return new Rectangle();
		} else {
			throw new IllegalArgumentException("不支持的形状类型");
		}
	}

	@Override
	Color getColor(String color) {
		return null;
	}
}
